<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>FitPeak - 管理员登录</title>
  <!-- 引入外部资源 -->
  <script src="https://cdn.tailwindcss.com"></script>
  <link href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css" rel="stylesheet">
  
  <!-- 配置Tailwind -->
  <script>
    tailwind.config = {
      theme: {
        extend: {
          colors: {
            primary: '#165DFF',
            secondary: '#FF7D00',
            dark: '#1F2937',
            light: '#F9FAFB'
          },
          fontFamily: {
            inter: ['Inter', 'system-ui', 'sans-serif'],
          },
        },
      }
    }
  </script>
  
  <!-- 自定义工具类 -->
  <style type="text/tailwindcss">
    @layer utilities {
      .content-auto {
        content-visibility: auto;
      }
      .text-shadow {
        text-shadow: 0 2px 4px rgba(0,0,0,0.1);
      }
      .transition-custom {
        transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
      }
      .input-focus {
        @apply focus:border-primary focus:ring-2 focus:ring-primary/20 focus:outline-none;
      }
    }
  </style>
  
  <style>
    body {
      font-family: 'Inter', system-ui, sans-serif;
      scroll-behavior: smooth;
    }
    
    .slide-in {
      animation: slideIn 0.5s ease forwards;
    }
    
    @keyframes slideIn {
      from {
        transform: translateY(20px);
        opacity: 0;
      }
      to {
        transform: translateY(0);
        opacity: 1;
      }
    }
    
    .bg-pattern {
      background-image: radial-gradient(#165DFF10 1px, transparent 1px);
      background-size: 20px 20px;
    }
  </style>
</head>
<body class="bg-gray-50 text-dark min-h-screen">
  <div class="flex flex-col md:flex-row min-h-screen">
    <!-- 左侧图片区域 -->
    <div class="hidden md:flex md:w-1/2 bg-dark relative overflow-hidden">
      <div class="absolute inset-0 bg-pattern opacity-30"></div>
      <div class="relative z-10 flex flex-col justify-center items-center text-white p-12 w-full">
        <div class="text-5xl font-bold mb-6 text-shadow slide-in" style="animation-delay: 0.1s">
          <i class="fa fa-shield mr-2"></i>管理员中心
        </div>
        <div class="text-xl mb-8 text-center slide-in" style="animation-delay: 0.2s">
          管理健身社区，保障平台安全
        </div>
        <div class="w-full max-w-md rounded-xl overflow-hidden shadow-2xl slide-in" style="animation-delay: 0.3s">
          <img src="https://picsum.photos/id/180/800/600" alt="管理员控制台" class="w-full h-auto object-cover">
        </div>
        <div class="mt-12 grid grid-cols-3 gap-6 w-full max-w-md slide-in" style="animation-delay: 0.4s">
          <div class="text-center p-4 rounded-lg bg-white/10 backdrop-blur-sm">
            <i class="fa fa-users text-3xl mb-2"></i>
            <div>用户管理</div>
          </div>
          <div class="text-center p-4 rounded-lg bg-white/10 backdrop-blur-sm">
            <i class="fa fa-bar-chart text-3xl mb-2"></i>
            <div>数据统计</div>
          </div>
          <div class="text-center p-4 rounded-lg bg-white/10 backdrop-blur-sm">
            <i class="fa fa-cog text-3xl mb-2"></i>
            <div>系统设置</div>
          </div>
        </div>
      </div>
    </div>
    
    <!-- 右侧登录表单区域 -->
    <div class="w-full md:w-1/2 flex items-center justify-center p-6 md:p-12">
      <div class="w-full max-w-md">
        <!-- 移动端Logo -->
        <div class="md:hidden text-center mb-8">
          <div class="text-4xl font-bold text-primary flex items-center justify-center">
            <i class="fa fa-shield mr-2"></i>管理员中心
          </div>
          <div class="text-gray-500 mt-1">管理健身社区，保障平台安全</div>
        </div>
        
        <!-- 表单标题 -->
        <div class="mb-8 text-center">
          <h2 class="text-[clamp(1.5rem,3vw,2rem)] font-bold">管理员登录</h2>
          <p class="text-gray-500 mt-2">请输入管理员账号信息</p>
        </div>
        
        <!-- 管理员登录表单 -->
        <form id="admin-login-form" class="space-y-5 slide-in">
          <div>
            <label for="admin-username" class="block text-sm font-medium text-gray-700 mb-1">管理员账号</label>
            <div class="relative">
              <span class="absolute inset-y-0 left-0 flex items-center pl-3 text-gray-500">
                <i class="fa fa-user-circle"></i>
              </span>
              <input type="text" id="admin-username" class="w-full pl-10 pr-4 py-3 rounded-lg border border-gray-300 input-focus transition-custom" placeholder="请输入管理员账号" required>
            </div>
          </div>
          
          <div>
            <label for="admin-password" class="block text-sm font-medium text-gray-700 mb-1">管理员密码</label>
            <div class="relative">
              <span class="absolute inset-y-0 left-0 flex items-center pl-3 text-gray-500">
                <i class="fa fa-lock"></i>
              </span>
              <input type="password" id="admin-password" class="w-full pl-10 pr-10 py-3 rounded-lg border border-gray-300 input-focus transition-custom" placeholder="请输入管理员密码" required>
              <button type="button" class="toggle-password absolute inset-y-0 right-0 flex items-center pr-3 text-gray-500 hover:text-primary transition-custom" data-target="admin-password">
                <i class="fa fa-eye-slash"></i>
              </button>
            </div>
          </div>
          
          <div class="flex items-center justify-between">
            <div class="flex items-center">
              <input id="admin-remember" type="checkbox" class="w-4 h-4 rounded border-gray-300 text-primary focus:ring-primary">
              <label for="admin-remember" class="ml-2 block text-sm text-gray-700">记住登录状态</label>
            </div>
            <a href="#" class="text-sm text-primary hover:underline">忘记密码？</a>
          </div>
          
          <button type="submit" class="w-full bg-dark hover:bg-dark/90 text-white font-medium py-3 px-4 rounded-lg transition-custom flex items-center justify-center group">
            <span>管理员登录</span>
            <i class="fa fa-sign-in ml-2 transform group-hover:translate-x-1 transition-transform"></i>
          </button>
          
          <!-- 返回普通用户登录链接 -->
          <div class="text-center pt-4">
            <a href="index.html" class="text-sm text-gray-600 hover:text-primary transition-colors">
              <i class="fa fa-arrow-left mr-1"></i>返回用户登录页面
            </a>
          </div>
        </form>
      </div>
    </div>
  </div>
  
  <script>
    // 密码显示/隐藏功能
    const toggleButtons = document.querySelectorAll('.toggle-password');
    toggleButtons.forEach(button => {
      button.addEventListener('click', () => {
        const targetId = button.getAttribute('data-target');
        const passwordInput = document.getElementById(targetId);
        const icon = button.querySelector('i');
        
        if (passwordInput.type === 'password') {
          passwordInput.type = 'text';
          icon.classList.remove('fa-eye-slash');
          icon.classList.add('fa-eye');
        } else {
          passwordInput.type = 'password';
          icon.classList.remove('fa-eye');
          icon.classList.add('fa-eye-slash');
        }
      });
    });
    
    // 表单提交处理
    document.getElementById('admin-login-form').addEventListener('submit', (e) => {
      e.preventDefault();
      
      const username = document.getElementById('admin-username').value;
      const password = document.getElementById('admin-password').value;
      
      // 在实际应用中，这里会有表单验证和提交到服务器的逻辑
      alert(`管理员登录功能：账号=${username}，密码=${password}（在实际应用中会提交到服务器验证）`);
    });
  </script>
</body>
</html>